package com.leyou.common.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author xiuer
 * @description 分页数据展示通用类
 * @create 2019/6/24 15:50
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResultVO<T> {
    /**
     * 总条数
     */
    private Long total;
    /**
     * 总页数
     */
    private Integer totalPage;
    /**
     * 当前页数据
     */
    private List<T> items;

    public PageResultVO(Long total, List<T> items) {
        this.total = total;
        this.items = items;
    }

    public PageResultVO(Long total,  List<T> items,Integer totalPage) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }
}
